﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="DealsRSSFeed.aspx.vb" Inherits="task3.DealsRSSFeed" %>

       <asp:Repeater id="rptRSS" runat="server" DataSourceID="AccessDataSource1">
  <HeaderTemplate>
    <rss version="2.0">
      <channel>
        <title>ViewMyDeals.com</title>
        <link></link>
        <description>
          This is the syndication feed for ViewMyDeals.com
        </description>
  </HeaderTemplate>

  <ItemTemplate>
        <item>
          <title><%# FormatForXML(DataBinder.Eval(Container.DataItem,
                                                                   "Dealname"))%></title>
          <description>
             <%# FormatForXML(DataBinder.Eval(Container.DataItem, 
                                     "DealDescription")) %>
          </description>
          <link>
             http://localhost:1337/DealDetail.aspx?DealId=<%# 
 DataBinder.Eval(Container.DataItem, "ID")%></link><author><%# FormatForXML(DataBinder.Eval(Container.DataItem,
                                                                   "UploadedBy"))%></author>
          <pubDate>
             <%# String.Format("{0:R}",
                                   DataBinder.Eval(Container.DataItem,
                                                          "DealCreatedDate"))%>
           </pubDate>
        </item>
  </ItemTemplate>

  <FooterTemplate>
      </channel>
    </rss>  
  </FooterTemplate>
</asp:Repeater>
    
    <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
        DataFile="~/App_Data/DealsDb.accdb" 
        SelectCommand="SELECT * FROM [DealDetail]">
    </asp:AccessDataSource>
